Basic template class for wrapping a std::array into a scripting environment. More...
Static Public Member Functions | |
| static nkScripts::FUNCTION_PARAMETER_TYPE | getNkType () |
| static void | updateEnvironmentPod (nkScripts::Environment *env, const nkMemory::StringView &typeName) |
| static void | updateEnvironmentClass (nkScripts::Environment *env, const nkMemory::StringView &typeName, const nkMemory::StringView &containedType) |
| static void * | constructor (const nkScripts::DataStack &stack) |
| static void | destructor (void *data) |
| static nkScripts::OutputValue | size (const nkScripts::DataStack &stack) |
| static nkScripts::OutputValue | readIndexPod (const nkScripts::DataStack &stack) |
| static nkScripts::OutputValue | readIndexClass (const nkScripts::DataStack &stack, const nkMemory::StringView &typeName) |
| static void | writeIndexPod (const nkScripts::DataStack &stack) |
| static void | writeIndexClass (const nkScripts::DataStack &stack) |
Basic template class for wrapping a std::array into a scripting environment.
Usage depends on whether the type is a class (which needs to be wrapped too) or a plain type :
| T | The array type, first argument in std::array's template parameter list. |
| S | The array size, second argument in std::array's template parameter list. |
|
static |
Utility function translating a template type T into the attached function parameter type to wrap in nkScripts.
|
static |
Updates an environment to add a type mirroring an std::array<T, S>, for a plain type.
| env | The environment to set up. |
| typeName | The type name of the array to set up, which will be its name in the environment. |
|
static |
Updates an environment to add a type mirroring an std::array<T, S>, for a class type.
| env | The environment to set up. |
| typeName | The type name of the array to set up, which will be its name in the environment. |
| containedType | The type name of the array's contained type. |
|
static |
Wrapper function for the constructor of the user type.
| stack | The parameter stack. |
|
static |
Wrapper function for the destructor of the user type.
| data | The data that has to be freed. |
|
static |
Wrapper function for std::array<T, S>::size.
| stack | The parameter stack. |
|
static |
Exposes the read by index operation on the type.
| stack | The parameter stack. |
|
static |
Exposes the read by index operation on the type.
| stack | The parameter stack. |
| typeName | The contained type name. |
|
static |
Exposes the write by index operation on the type.
| stack | The parameter stack. |
|
static |
Exposes the write by index operation on the type.
| stack | The parameter stack. |